<?xml version="1.0" encoding="UTF-8"?>
<!--
	
                 Springs On Rails
                 Copyright [2007] [Sunny Liu]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.	
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
  
  <modelVersion>4.0.0</modelVersion>
  <groupId>${appConfig.groupId}</groupId>
  <artifactId>${appConfig.artifactId}</artifactId>
  <packaging>war</packaging>
  <version>${appConfig.version}</version>
  <description>Automatically generated Maven 2 POM template</description>  
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
           <webResources>
            <resource>            
              <directory>src/main/java</directory>
			  <targetPath>WEB-INF/classes</targetPath>
              <excludes>
               <exclude>**/*.java</exclude>                     
              </excludes>              
            </resource>
          </webResources>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>compile</id>
            <phase>compile</phase>
            <configuration>
              <#noparse>
              <tasks>
              	<copy todir="${basedir}/target/classes">
				    <fileset dir="${basedir}/src/main/java">
				      <exclude name="**/*.java"/>
				    </fileset>
				</copy>              	
              </tasks>
              </#noparse>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
         <groupId>org.mortbay.jetty</groupId>
         <artifactId>maven-jetty-plugin</artifactId>
         <configuration>
           <scanIntervalSeconds>10</scanIntervalSeconds>
           <connectors>
             <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
               <port>8080</port>               
               <maxIdleTime>60000</maxIdleTime>
             </connector>
             </connectors>
             <contextPathSpec>${appConfig.artifactId}</contextPathSpec>            
             <scanTargets>
				<scanTarget>src/main/java</scanTarget>				
			</scanTargets>
			<scanTargetPatterns>          
			   <scanTargetPattern>    
					<directory>src/main/java</directory>
					<includes>
	                <include>**/*.xml</include>
						<include>**/*.properties</include>
					</includes>
					<excludes>
						<exclude>**/*.java</exclude>                
					</excludes>        
				</scanTargetPattern>
			</scanTargetPatterns>
         </configuration>       
      </plugin>
    </plugins>
  </build>
    
  <dependencies>
    <#if appConfig.ormType=="hibernate" >    
    <dependency>
      <groupId>hibernate</groupId>
      <artifactId>hibernate</artifactId>
      <version>3.0.5</version>
    </dependency>
    <#else>
    <dependency>
      <groupId>com.ibatis</groupId>
      <artifactId>ibatis2-common</artifactId>
      <version>2.1.7.597</version>
    </dependency>
    <dependency>
      <groupId>com.ibatis</groupId>
      <artifactId>ibatis2-dao</artifactId>
      <version>2.1.7.597</version>
    </dependency>
    <dependency>
      <groupId>com.ibatis</groupId>
      <artifactId>ibatis2-sqlmap</artifactId>
      <version>2.1.7.597</version>
    </dependency>
    </#if>
    <dependency>
      <groupId>commons-beanutils</groupId>
      <artifactId>commons-beanutils</artifactId>
      <version>1.7.0</version>
    </dependency>
    <dependency>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
      <version>3.2</version>
    </dependency>
    <dependency>
      <groupId>commons-dbcp</groupId>
      <artifactId>commons-dbcp</artifactId>
      <version>1.2.1</version>
    </dependency>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>1.1</version>
    </dependency>
    <dependency>
      <groupId>commons-pool</groupId>
      <artifactId>commons-pool</artifactId>
      <version>1.3</version>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.14</version>
    </dependency>   
    
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring</artifactId>
      <version>2.0.2</version>
    </dependency>
   
    <!-- web container -->
    <dependency>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>jetty</artifactId>
	  <version>6.0.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>jetty-util</artifactId>
	  <version>6.0.2</version>
      <scope>test</scope>
    </dependency>

    <!-- enable commons-logging when inside jetty6:run -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId> 
	  <version>1.4.3</version>	  
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId> 
	  <version>1.4.3</version>	  
    </dependency>
    
    <#if appConfig.viewType=="ws" || appConfig.viewType=="webservice" >    
    <dependency>
      <groupId>org.codehaus.xfire</groupId>
      <artifactId>xfire-core</artifactId>
      <version>1.2.4</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.xfire</groupId>
      <artifactId>xfire-spring</artifactId>
      <version>1.2.4</version>
    </dependency>
    <#else>
     <!-- JSTL support -->
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>jstl</artifactId>  
	  <version>1.1.2</version>	  
    </dependency>
    <dependency>
      <groupId>taglibs</groupId>
      <artifactId>standard</artifactId>
	  <version>1.1.2</version>
    </dependency>    
    </#if>
  </dependencies> 
 
</project>

